﻿using BBICMS.Repository;
using BBICMS.WebUI.Filters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace BBICMS.WebUI.Areas.Admin.Controllers
{
    
    
           [SIGAuth]
    public class HomeController : BaseController
    {
             
        // GET: /bbi-Admin/Home/

        public ActionResult Index()
        {

           // ViewBag.CategoryCount = _unit.Categories.GetAll().Count();
            ViewBag.ProductCount = _unit.Products.GetAll().Count();
            ViewBag.TeamCount = _unit.Teams.GetAll().Count();
            ViewBag.NewsCount = _unit.Posts.GetAll().Count();
            ViewBag.WorkCount = _unit.Works.GetAll().Count();
            ViewBag.CarouselCount = _unit.Carousels.GetAll().Count();

            ViewBag.Roles = string.Join("；", User.Roles);
            ViewBag.LastLoginTime = _unit.Users.GetById(User.UserId).LastActivityDate;

            return View();
        }

    }
}
